import * as lib from "./lib/index";
import callCloudBase from './callcloud'


// 弹幕项目的云环境
// const cloudConfig = {
//   envid: 'one-e1dd7a',
//   appid: "wxb8a458b7b60cac43",
//   scope: 'xxx',
//   app-secret-pc-need: 'xxx'
// }


// 日历项目云环境
const cloudConfig = {
  envid: 'one-a9twq',
  appid: "wxa57a87d303a63c7d",
  scope: 'xxx',
  'app-secret-pc-need': 'xxx'
}

wx.cloud.init({ 
  env: cloudConfig.envid,
  traceUser: true 
})

const cloudbase = wx.cloud
const app = wx.cloud
const auth = {}
const db = app.database();
const callCloud = callCloudBase(app, lib)

module.exports = {
  app,
  auth,
  cloudbase,
  db,
  cloudConfig,
  lib,
  callCloud
}